package old.day05;
import java.util.Scanner;

public class Day05Exercise {
    public static void main(String[] args) {
        for(int i=1;i<=6;i++){
            for(int j=1;j<=6-i;j++){
                System.out.print(" ");
            }
            for(int k=1;k<=2*i-1;k++){
                System.out.print("*");
            }
            System.out.println();
        }
    }


























        /*
        int sum =1;
        for (int i=1;i<=8;i++){
            sum*=i;
        }
        System.out.println(sum);

         */




















        /*
        int num=0;
        for (int i=2;i<=100;i+=2){
               num+=i;
            }
        System.out.println(num);
        }

         */























        /*
        int[] arr=new int[10];
        for (int i=0;i<arr.length;i++){
            arr[i]=(int) (Math.random()*100);
            System.out.println(arr[i]);
        }

         */




















        /*
        int[] arr=new int[10];
        int[] a={1,2,3,4};
        int[] b=new int[]{1,2,3,4};
        int[] c;
        c=new int[]{1,2,3};
        arr[0]=10;
        arr[1]=20;
        arr[arr.length-1]=100;
        System.out.println(arr[arr.length-1]);

         */























        /*
        for (int num=1;num<10;num++){
            for (int i=1;i<=num;i++){
                System.out.print(i+"*"+num+"="+i*num+"\t");
            }
            System.out.println();
        }

         */




















        /*
        for (int num=1;num<10;num++){
          for (int i=1;i<=num;i++){
              System.out.print(i+"*"+num+"="+i*num+"\t");
          }
            System.out.println();

        }

         */



















        /*
        Scanner scan=new Scanner(System.in);
        int score=0;
        for (int i=1;i<=10;i++){
            int a=(int) (Math.random()*100);
            int b=(int) (Math.random()*100);
            int num=a+b;
            System.out.println(a+"+"+b+"=?");
            System.out.println("算吧");
            int answer=scan.nextInt();
            if (answer==-1){
                break;
            }
            if (answer==num){
                System.out.println("算对了");
                score+=10;
            }else {
                System.out.println("算错了");
            }
        }
        System.out.println(score);

         */





















        /*
        int i=1;
        int j=i++;//j=1
        int k=i++ +i*i++;//2+3*3=11、2+1+1=4
        System.out.println(i);
        System.out.println(j);
        System.out.println(k);

         */

}
